package com.testfileupload.uploadimg.design.flyweight.define;

public abstract class Flywight {
    //内部状态
    private String intrinsic;
    //外部状态,最好是以String、int，不需要equal和hash方法性能会好
    protected final String Extrinsic;

    public Flywight(String extrinsic) {
        Extrinsic = extrinsic;
    }
    //业务操作
    public abstract void operate();

    public String getIntrinsic() {
        return intrinsic;
    }

    public void setIntrinsic(String intrinsic) {
        this.intrinsic = intrinsic;
    }
}
